package kr.co.boogui.actions;

import java.io.IOException;
import java.net.URLDecoder;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import kr.co.boogui.dao.ZipcodeDAO;

public class ZipcodeAction implements ActionHandler {
	@Override
	public String execute(HttpServletRequest req, HttpServletResponse res)
			throws ServletException, IOException {
		/*String viewPage = "f|/WEB-INF/jsp/admin/admin.jsp";		
		viewPage = AdminChkService.adminChk(req, "cinema_registry");
		req.setCharacterEncoding("UTF-8");
		req.setAttribute("action", "cinema_registry.jsp");*/
		String viewPage = "f|/WEB-INF/jsp/admin/zipcode.jsp";		
		String dong = URLDecoder.decode(req.getParameter("dong"));	
		req.setAttribute("zipcodelist", ZipcodeDAO.readZipcode(dong));				
		
		return viewPage;
	}
}
